OOP 101 Examples

These examples were presented at the Frameworks Conference 2007 in Rockville MD.
Each example results in the same output or user experience; it's the differences in the code that matter. The first example shows how a programmer might approach the task of feeding several animals. The second example shows that using objects (via CFCs in this case) does not mean OO techniques have been used. The third example shows an actual OO approach to the task.

Feed Pets Procedure

Feed Pets Pseudo-OO

Feed Pets OO